﻿<Window x:Class="Ruction.WindowMain"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:app="clr-namespace:Ruction"
    Title="Ruction" Height="594" Width="929">
    <Window.CommandBindings>
        <CommandBinding Command="{x:Static app:GameCommands.Exit}" Executed="CommandBinding_Executed" />
        <CommandBinding Command="{x:Static app:GameCommands.About}" Executed="CommandBinding_Executed" />
        <CommandBinding Command="{x:Static app:GameCommands.NetGameStart}" Executed="CommandBinding_Executed" />
        <CommandBinding Command="{x:Static app:GameCommands.NetGameJoin}" Executed="CommandBinding_Executed" />
        <CommandBinding Command="{x:Static app:GameCommands.NetGameChatSend}" Executed="CommandBinding_Executed" />
    </Window.CommandBindings>
    <Grid>
        <DockPanel>
            <Menu DockPanel.Dock="Top">
                <MenuItem Header="_File">
                    <MenuItem Header="_Exit" Command="{x:Static app:GameCommands.Exit}" InputGestureText="Ctrl+Q" />
                </MenuItem>
                <MenuItem Header="_Game">
                    <MenuItem Header="_Network Game">
                        <MenuItem Header="_Join a game" Command="{x:Static app:GameCommands.NetGameJoin}" InputGestureText="Ctrl+J"  />
                        <MenuItem Header="_Start a game" Command="{x:Static app:GameCommands.NetGameStart}" InputGestureText="Ctrl+Shift+J" />
                    </MenuItem>
                </MenuItem>
                <MenuItem Header="_Help">
                    <MenuItem Header="_About" Command="{x:Static app:GameCommands.About}"  InputGestureText="Alt+Enter" />
                </MenuItem>
            </Menu>
            <StatusBar DockPanel.Dock="Bottom">
                <StatusBarItem Content="Ready" />
            </StatusBar>
            <Grid DockPanel.Dock="Bottom">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="250" MinWidth="250" />
                </Grid.ColumnDefinitions>
                <DockPanel Grid.Column="0" />
                <GridSplitter Grid.Column="1" ResizeDirection="Columns" HorizontalAlignment="Stretch" Height="Auto" Width="4" />
                <TabControl Grid.Column="2">
                    <TabItem Header="Chat">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="40" MinHeight="40" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="48" />
                            </Grid.ColumnDefinitions>
                            <Border Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" CornerRadius="8" BorderThickness="2" BorderBrush="LightGray">
                                <ItemsControl />
                            </Border>
                            <GridSplitter Grid.Row="1" Grid.RowSpan="1" Grid.Column="0" Grid.ColumnSpan="2" ResizeDirection="Rows" Width="Auto" Height="4" HorizontalAlignment="Stretch" />
                            <TextBox Grid.Column="0" Grid.Row="2" />
                            <Button Grid.Column="1" Grid.Row="2" Command="{x:Static app:GameCommands.NetGameChatSend}" Content="_Send" />
                        </Grid>
                    </TabItem>
                    <TabItem Header="Messages">
                        <Border Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" CornerRadius="8" BorderThickness="2" BorderBrush="LightGray">
                            <ItemsControl />
                        </Border>
                    </TabItem>
                </TabControl>
            </Grid>
        </DockPanel>
    </Grid>
</Window>
